<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Supplier/Mall_device.js此处编写
 -->
 <template>
  <div>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormFileds="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormFileds="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/Supplier/Mall_device.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid
  },
  data () {
    return {
      table: {
        key: 'id',
        footer: "Foots",
        cnName: '供应商设备列表',
        name: 'Mall_device',
        url: "/Mall_device/",
        sortName: "id"
      },
      extend: extend,
      editFormFields: { "deviceCode": "","deviceModel":"", "deviceName": "", "deviceMac": "", remark:'',"deviceIp": "", "supplierCode": "", "modifier": "", "modifyDate": "", "modifyID": "", "createDate": "", "createID": "", "creator": '' },
      editFormOptions: [
        [{ "title": "设备编码", "required": true, "field": "deviceCode", "type": "text" },
        { "title": "设备名称", "field": "deviceName", "type": "text" }],
        [{ "title": "设备Mac地址", "required": true, "field": "deviceMac", "type": "text" },
        { "title": "设备ip地址", "field": "deviceIp", "type": "text" }],
        [{ "title": "供应商编码", "dataKey": "mall_supplier", "data": [], "type": "select", "required": true, "field": "supplierCode" },
        { "title": "设备型号", "field": "deviceModel", "type": "text" }
        ],
        [{ title: "备注", field: "remark", type: "textarea",colSize: 12,placeholder: "请输入备注",}],
      ],
      searchFormFields: {"deviceName":""},
      searchFormOptions: [[{"title": "设备名称 ", "field": "deviceName", "type": "like" }]],
      columns: [{ field: 'id', title: 'id', type: 'int', width: 120, hidden: true, readonly: true, require: true, align: 'left' },
      { field: 'deviceCode', title: '设备编码', type: 'string', width: 120, align: 'left', sortable: true },
      { field: 'deviceName', title: '设备名称', type: 'string', width: 120, align: 'left' },
      { field: 'deviceMac', title: '设备Mac地址', type: 'string', width: 120, align: 'left' },
      { field: 'deviceIp', title: '设备ip地址', type: 'string', width: 120, align: 'left' },
      { field: 'supplierCode', title: '供应商编码', bind: { key: "mall_supplier", data: [] }, type: 'select', width: 120, align: 'left' },
      { field: 'modifier', title: '修改人', type: 'string', width: 120, align: 'left' },
      { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 120, align: 'left', sortable: true },
      { field: 'modifyID', title: '修改人ID', type: 'int', width: 120, hidden: true, align: 'left' },
      { field: 'createDate', title: '创建时间', type: 'datetime', width: 120, align: 'left', sortable: true },
      { field: 'createID', title: '创建人ID', type: 'int', width: 120, hidden: true, align: 'left' },
      { field: 'creator', title: '创建人', type: 'string', width: 120, align: 'left' }],
      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: ""
      }
    };
  }
};
export default vueParam;
</script>
